package net.mingsoft.basic.aop;

import org.springframework.stereotype.*;
import net.mingsoft.basic.util.*;
import net.mingsoft.basic.entity.*;
import net.mingsoft.basic.annotation.*;
import net.mingsoft.basic.constant.e.*;

@Component
public class SystemLogAop extends BaseLogAop
{
    @Override
    public String getUserName() {
        final ManagerEntity managerSession = BasicUtil.getManager();
        if (managerSession == null) {
            return "";
        }
        return managerSession.getManagerName();
    }
    
    @Override
    public boolean isCut(final LogAnn log) {
        return log.operatorType() == OperatorTypeEnum.MANAGE;
    }
}
